package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

/**
 * 学生实体类
 */
@TableName("t_student")
public class StudentBean {
    //学生id
    @TableId(value = "pk_studentId",type = IdType.AUTO)
    private Integer id;
    //学生姓名
    @TableField("t_studentName")
    private String studentName;
    //学生电话
    @TableField("t_studentPhone")
    private String studentPhone;
    //学生性别
    @TableField("t_studentSex")
    private String sex;
    //学生班级
    @TableField("fk_classId")
    private Integer classId;
    @TableField(exist = false)
    private ClassBean classBean;
    @TableField(exist = false)
    private String className;
    //学生房间
    @TableField("fk_roomId")
    private Integer roomId;
    @TableField(exist = false)
    private RoomBean roomBean;
    @TableField(exist = false)
    private String roomName;
    //学生入住时间
    @TableField("t_studentDate")
    private LocalDate studentDate = LocalDate.now();
    //学生头像
    @TableField("t_studentImg")
    private String studentImg;

    public StudentBean () {}

    public StudentBean(String studentName, String studentPhone, String sex, String studentImg, Integer classId, Integer roomId ) {
        this.studentName = studentName;
        this.studentPhone = studentPhone;
        this.sex = sex;
        this.classId=classId;
        this.roomId=roomId;
        this.studentImg = studentImg;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getStudentPhone() {
        return studentPhone;
    }

    public void setStudentPhone(String studentPhone) {
        this.studentPhone = studentPhone;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public ClassBean getClassBean() {
        return classBean;
    }

    public void setClassBean(ClassBean classBean) {
        this.classBean = classBean;
    }

    public RoomBean getRoomBean() {
        return roomBean;
    }

    public void setRoomBean(RoomBean roomBean) {
        this.roomBean = roomBean;
    }

    public LocalDate getStudentDate() {
        return studentDate;
    }

    public void setStudentDate(LocalDate studentDate) {
        this.studentDate = studentDate;
    }

    public String getStudentImg() {
        return studentImg;
    }

    public void setStudentImg(String studentImg) {
        this.studentImg = studentImg;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    @Override
    public String toString() {
        return "StudentBean{" +
                "id=" + id +
                ", studentName='" + studentName + '\'' +
                ", studentPhone='" + studentPhone + '\'' +
                ", sex='" + sex + '\'' +
                ", classId=" + classId +
                ", classBean=" + classBean +
                ", roomId=" + roomId +
                ", roomBean=" + roomBean +
                ", studentDate=" + studentDate +
                ", studentImg='" + studentImg + '\'' +
                "}\n";
    }
}
